package main;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;

import model.DrawingModel;
import model.NoFileRTE;
import model.TestFile;

import view.DrawingView;


public class Draw {

	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		System.out.println("Accepted parameters: \n Draw\n Draw -test");
		// no parameters were entered
		if (args.length == 0)
		{
			String path = DrawingView.getOpenFileFromDialog();
			if (path.equals(""))
				return;
			
			GUIManager.getInstance().addGUI(path);
			return;
		}
		
		// user wants to run the regression test
		if ( args[0].equals("-test"))
		{
			DrawingModel.Test();
			return;
		}

	}

}
